package com.ray.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ray.bean.DeptReachBean;
import com.ray.bean.DutyBean;
import com.ray.bean.InCountBean;
import com.ray.bean.OrderBean;
import com.ray.bean.ReportBean;
import com.ray.bean.ReturnWorkBean;
import com.ray.bean.TableData;
import com.ray.bean.TurnOverBea;
import com.ray.bean.TurnoverBean;
import com.ray.pojo.MyUser;

public interface ReturnWorkMapper {

	//获取已经返修数目
	long getqualified(@Param("reportBean")ReportBean reportBean);

	//插入返修数据
	void insertReport(@Param("reportBeanList")List<ReportBean> reportBean);

	//获取排序数
	long getMaxSort();

	//插入返修数据
	void insertReturnWork(@Param("returnWorkBeanList")List<ReturnWorkBean> returnWorkBean);

	//获取厂家
	List<String> getFactoryReturn(@Param("workShopName")String workShopName);

	//获取设备编号
	List<String> getDeviceIdReturn(@Param("workShopName")String workShopName);

	//获取设备名称
	List<String> getDeviceNameReturn(@Param("workShopName")String workShopName);

	//获取返修订单颜色数据
	List<String> returnWorkColor(@Param("machining")String machining,@Param("orderId") String orderId);

	//通过报工获取返修数据
	long getReturnWorkByReportBean(@Param("reportBean")ReportBean reportBean);

	//获取车间入库数
	long getOrderInCount(@Param("reportBean")ReportBean reportBean);

	//获取报工数
	long getReportCount(@Param("reportBean")ReportBean reportBean);

	//获取部门达成率 
	List<DeptReachBean> getTotal(@Param("date")String date,@Param("startDay")String startDay,@Param("days") int days,@Param("myUser") MyUser myUser);

	//获取车间员工效率 
	List<TableData> getTableData(Map map);
	//获取车间员工效率 数量
	int getTableDataCount(Map map);

	//获取拖期订单
	List<DutyBean> getDelayDate(Map map);
	
	//获取拖期数量
	int getDelayDateCount(Map map);
	
    //获取即将拖期订单
	List<DutyBean> getSoonDelay(Map map);

	List<DeptReachBean> getOnTime(Map map);

    //获取七天内拖期订单数
	List<DeptReachBean> getSereven(Map map);


	//获取正在生产的订单号
	List<String> getWorkingOrder(Map map);
	//获取每个车间周转量
	List<TurnoverBean> getDeptTurnover(Map map);

	//获取某车间周转量单个订单数据
	List<TurnOverBea> getTrunover(Map map);
	
	//获取整厂在生产中的订单
	List<String> getFactoryWorkingOrder(Map map);

	//获取在生产投料数
	long getFeddingCount(@Param("orderList")List<String> orderList);

	//获取在生产出库数
	long getOutCount(@Param("orderList")List<String> orderList);

	//订单查询获取订单生产流程
	List<DutyBean> getOrderWork(Map map);

	//获取车间工序产能
	List<Map> queryCapacity(@Param("workshopName")String workshopName,@Param("workingProcedureName")String workingProcedureName,@Param("titleList") List<String> titleList);

	//获取车间七日周转量
	List<DeptReachBean> serverTurnover(Map map);
	
	//获取人员达成率
	List<TableData> getPersonData(Map map);

	//获取订单在车间入库数
	long getInCount(Map map);

	//获取返修报工对象
	List<String> getMachining(Map map);
	
	
}
